#!/usr/bin/env python
#coding:utf-8
#使用os.path搜索文件系统

import os

class MyWalk:
    def __init__(self):
        self.arg = ''
        self.dirs = []
        self.files = []

    def callback(self):
        for file in files:
            print os.path.join(self.dirs, self.files), repr(self.arg)

    def OnWalk(self):
        os.path.walk(".", self.callback, "secret message")

if __name__ == '__main__':
    w = MyWalk()
    w.OnWalk()
